﻿@model AutoPartsSearch.Web.ViewModels.Offer.List
@using AutoPartsSearch.Web.HtmlHelpers
@{
    ViewBag.Title = @T("История моих предложений").ToHtmlString();
}
<h2 class="title">@T("История моих предложений")</h2>
<div class="container-main ui-corner-all padtop5 wid100prc">
    <div class="container-sub-no-width wid749px">
        <table id="list">
            <thead>
                <tr>
                    <th style="width: 40px;">
                    </th>
                    <th>
                        @T("Авто")
                    </th>
                    <th>
                        @T("Запчасть")
                    </th>
                    <th>
                        @T("Цена")
                    </th>
                    <th>
                        @T("Создан")
                    </th>
                </tr>
            </thead>
            <tbody>
                @foreach (var offer in Model.Offers)
                {
                    <tr>
                        <td>
                            <div class="buttons ">
                                <div class="ui-state-default ui-corner-all  ui-icon-button">
                                    @Html.ActionLink(T("Детали").ToHtmlString(), "Details", new { id = offer.Id }, new { @class = "ui-icon ui-icon-search", title = @T("Детали запроса") })
                                </div>
                            </div>
                        </td>
                        <td class="Car">@offer.SearchQuery.CarBrand.Name.Default @offer.SearchQuery.CarModel
                        </td>
                        <td class="Part">@offer.SearchQuery.Name
                        </td>
                        <td class="Price">@offer.Price @offer.Currency
                        </td>
                        <td class="Created">@offer.Created.ToString("dd/MM/yyyy HH:mm")
                        </td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
    <div class="container-sub mrgtop3 hght22px  wid749px">
        <div class="mrgtop3">
            @Html.PageLinks(Model.PagingInfo
                      , x => Url.Action("Index", new { page = x, pageSize = Model.PagingInfo.ItemsPerPage, processed = ViewBag.Processed })
                      , "pagingLink ui-state-default ui-corner-all", "ui-state-active")
        </div>
    </div>
</div>
